//
//  RCOderDetailModel.m
//  RocketProject
//
//  Created by chen jiedan on 13-10-3.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import "RCOderDetailModel.h"
#import "KFObjectExtension.h"

@implementation RCOderDetailModel
@synthesize orderID = _orderID;
@synthesize name = _name;
@synthesize datetime = _datetime;
@synthesize status = _status;
@synthesize sex = _sex;
@synthesize phone = _phone;
@synthesize reversetime = _reversetime;
@synthesize persons = _persons;
@synthesize type = _type;
@synthesize content = _content;
@synthesize price = _price;
@synthesize remark = _remark;
@synthesize awardpoint = _awardpoint;

+(id)parseDataFromJSON:(NSDictionary *)dataDic{
    if (nil == dataDic) {
        return nil;
    }
    NSDictionary *data = [dataDic dictionaryValueForKey:@"data" defaultValue:nil];
  
    
    RCOderDetailModel *retObject = nil;
    retObject = [[[RCOderDetailModel alloc]init] autorelease];
    if (nil == retObject) {
        return nil;
    }
    retObject.orderID = [data stringValueForKey:@"orderid" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.name = [data stringValueForKey:@"name" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.datetime = [data stringValueForKey:@"datetime" defaultValue:@"" operation:NSStringOperationTypeNone];
    if ([retObject.datetime isEqualToString:@""]) {
        retObject.datetime = [data stringValueForKey:@"time" defaultValue:@"" operation:NSStringOperationTypeNone];
    }
    retObject.status = [data stringValueForKey:@"status" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.sex = [data stringValueForKey:@"sex" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.phone = [data stringValueForKey:@"phone" defaultValue:@"" operation:NSStringOperationTypeNone];
    if ([retObject.phone isEqualToString:@""]) {
        retObject.phone = [data stringValueForKey:@"mobile" defaultValue:@"" operation:NSStringOperationTypeNone];
    }
    retObject.reversetime = [data stringValueForKey:@"reversetime" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.persons = [data stringValueForKey:@"persons" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.type = [data stringValueForKey:@"type" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.content = [data stringValueForKey:@"content" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.price = [data stringValueForKey:@"price" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.remark = [data stringValueForKey:@"remark" defaultValue:@"" operation:NSStringOperationTypeNone];
    retObject.awardpoint = [data stringValueForKey:@"awardpoint" defaultValue:@"" operation:NSStringOperationTypeNone];
    return retObject;
    
   
}


@end
